main:
	addi	sp,sp,-32
  sw	ra,28(sp)
  sw	s0,24(sp)
  sw	s1,20(sp)
  addi	s0,sp,32
  li	a5,6
  sw	a5,-20(s0)
  li	a5,-2
  sw	a5,-24(s0)
  li	a5,-1
  sw	a5,-28(s0)
  li	a5,7
  sw	a5,-32(s0)
  lw	a4,-20(s0)
  lw	a5,-24(s0)
  add	a5,a4,a5
  mv	a0,a5
  call	square
  mv	s1,a0
  lw	a4,-28(s0)
  lw	a5,-32(s0)
  add	a5,a4,a5
  mv	a0,a5
  call	square
  mv	a5,a0
  ble	s1,a5,.L8
  lw	a5,-20(s0)
  j	.L9
.L8:
  lw	a5,-28(s0)
.L9:
  mv	a0,a5
  lw	ra,28(sp)
  lw	s0,24(sp)
  lw	s1,20(sp)
  addi	sp,sp,32
  jr	ra
mul:
  addi	sp,sp,-48
  sw	s0,44(sp)
  addi	s0,sp,48
  sw	a0,-36(s0)
  sw	a1,-40(s0)
  sw	zero,-20(s0)
  sw	zero,-28(s0)
  sw	zero,-24(s0)
  j	.L2
.L3:
  lw	a4,-20(s0)
  lw	a5,-40(s0)
  add	a5,a4,a5
  sw	a5,-20(s0)
  lw	a5,-24(s0)
  addi	a5,a5,1
  sw	a5,-24(s0)
.L2:
  lw	a4,-24(s0)
  lw	a5,-36(s0)
  blt	a4,a5,.L3
  lw	a5,-20(s0)
  mv	a0,a5
  lw	s0,44(sp)
  addi	sp,sp,48
  jr	ra
square:
  addi	sp,sp,-32
  sw	ra,28(sp)
  sw	s0,24(sp)
  addi	s0,sp,32
  sw	a0,-20(s0)
  lw	a1,-20(s0)
  lw	a0,-20(s0)
  call	mul
  mv	a5,a0
  mv	a0,a5
  lw	ra,28(sp)
  lw	s0,24(sp)
  addi	sp,sp,32
  jr	ra

